package com.gitee.hermer.engine.jars.starter.thread.pool.callback;

import java.util.concurrent.atomic.AtomicBoolean;

public abstract class CallableResult<V> {
	
	private AtomicBoolean isdone = new AtomicBoolean(false);
	
	public boolean isDone(){
		return isdone.get();
	}
	
	public void done(){
		isdone.compareAndSet(false, true);
	}
	
	public abstract void onCall(V value) throws Exception;
	
	public void onError(Throwable e){
		
	}

}
